//package com.cu.employmentmanagementsystem.handler;
//
//import cn.dev33.satoken.stp.StpUtil;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Component;
//
//import javax.servlet.*;
//import javax.servlet.annotation.WebFilter;
//import java.io.IOException;
//
//@Slf4j
//@Component
//@WebFilter(urlPatterns = "/*", filterName = "loginCheckFilter")
//public class SaTokenRenew implements Filter
//{
//    @Override
//    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException
//    {
//        try
//        {
//            // 先检查是否已过期
//            StpUtil.checkActiveTimeout();
//        }
//        catch (Exception e)
//        {
//            // 检查通过后继续续签
//            log.info(StpUtil.getLoginIdAsString() + "续期Token");
//            StpUtil.updateLastActiveToNow();
//        }
//
//        filterChain.doFilter(servletRequest, servletResponse);
//    }
//}
